<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<%@ taglib uri="/WEB-INF/tlds/att.tld" prefix="att"%>

<html>
<head>
<meta name="decorator" content="moduleEdit" />
<script type="text/javascript" src="${staticPath}/js/brand.js"></script>
<script type="text/javascript">
	$(document).ready(function() {
		$("#supplierRegister_businessNo").focus();
		$("#supplierRegisterForm").validate({
			rules: {
				businessNo:{
					businessno:true
				 },
				landTaxNo:{
					landtaxno:true
				},
				registerAmount:{
					number:true 
				}
			 },
			submitHandler: function(form){
				Oosp_Loading('正在提交，请稍等...');
				form.submit();
			},
			errorContainer: "#messageBox",
			errorPlacement: function(error, element) {
				$("#messageBox").text("输入有误，请先更正。");
				if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
					error.appendTo(element.parent().parent());
				} else {
					error.insertAfter(element);
				}
			}
			
		});
	})
</script>
<style type="text/css">
h4{ border-bottom:1px dotted #ccc; padding-bottom:10px; margin:30px 0 15px; color:#b12028; font-size: 12px;}
.span-required {color: red;}
</style>
</head>
<body>

<div class="Report_f">
           <div class="Report_f_1">
                <div class="Report_f_title_1">供应商准入</div>
                <ul class="nav nav-tabs Report_f_title_2">
                    <li><a href="#label_1" data-toggle="tab">公司资质信息</a></li>
                  </ul>
			<!-- Tab panes -->
			<div class="tab-content Report_f_title_3">
              <div class="tab-pane active" id="label_1">
                   <div class="Report_f_title_4">
                        <form:form id="supplierRegisterForm" modelAttribute="supplierRegister" enctype="multipart/form-data" action="${contextPath}/biz/brand/supplierRegister/save" method="post" class="form-inline" role="form">
                         <form:hidden path="id" />
                         <form:hidden path="supplierAccountId"/>
						<tags:message content="${message}" />
						<h4>营业执照信息</h4>
						<div class="f_2">
								<div class="form-group col-sm-6">
			   					<label for="supplierRegister_businessNo" class="col-sm-3 control-label f_4"><span class="span-required">*</span>营运执照号:</label>
							   <div class="col-sm-9 f_6">
							    	<form:input id="supplierRegister_businessNo" placeholder="请输入营运执照号"
									path="businessNo" htmlEscape="false" rows="4"
									class="f_5 required" />
							    </div>
							</div>
							<div class="form-group col-sm-6">
								<label for="supplierRegister_legalPerson" class="col-sm-3 control-label f_4"><span class="span-required">*</span>法定代表人姓名:</label>
								<div class="col-sm-9 f_6">
									<form:input id="supplierRegister_legalPerson"
										path="legalPerson" htmlEscape="false" rows="4"
										class="f_5 required" />
								</div>
							</div>
						</div>
						<div class="f_2">
								<div class="form-group col-sm-6">
			   					<label for="registerAddress" class="col-sm-3 control-label f_4"><span class="span-required">*</span>营业执照注册地方:</label>
							   <div class="col-sm-9 f_6">
							    	<form:input id="registerAddress"
										path="registerAddress" htmlEscape="false" rows="4"
										class="f_5 required" />
							    </div>
							</div>
							<div class="form-group col-sm-6">
								<label for="registerAmount" class="col-sm-3 control-label f_4">注册资金(万):</label>
								<div class="col-sm-9 f_6">
									<form:input id="registerAmount" path="registerAmount" htmlEscape="false" rows="4" class="f_5" />
								</div>
							</div>
						</div>
						<div class="f_2">
							<div class="form-group col-sm-6">
			   					<label for="registerAddress" class="col-sm-3 control-label f_4"><span class="span-required">*</span>起始日期:</label>
							   <div class="col-sm-9 f_6">
							    	<div class="input-group date form_date" data-date="" data-date-format="yyyy-mm-dd" >
										<input class="form-control f_13 required" type="text" placeholder="起始日期"
											id="supplierRegister_registerDate"
											name="registerDate"
											value="<fmt:formatDate value="${supplierRegister.registerDate}" pattern="yyyy-MM-dd"/>"
											readonly />
											<span class="input-group-addon f_time"><span class="glyphicon glyphicon-remove"></span></span>
					                		<span class="input-group-addon f_time"><span class="glyphicon glyphicon-calendar"></span></span>
									</div>
							    </div>
							</div>
							<div class="form-group col-sm-6">
								<label for="registerAmount" class="col-sm-3 control-label f_4"><span class="span-required">*</span>截止日期:</label>
								<div class="col-sm-9 f_6">
									 <div class="input-group date form_date" data-date="" data-date-format="yyyy-mm-dd" >
										<input class="form-control f_13 required" type="text" placeholder="截止日期"
											id="supplierRegister_endDate" name="endDate"
											value="<fmt:formatDate value="${supplierRegister.endDate}" pattern="yyyy-MM-dd"/>"
											readonly />
											<span class="input-group-addon f_time"><span class="glyphicon glyphicon-remove"></span></span>
					                		<span class="input-group-addon f_time"><span class="glyphicon glyphicon-calendar"></span></span>
									</div>
								</div>
							</div>
						</div>
						<div class="f_2">
							<div class="form-group col-sm-6">
								<label for="address" class="col-sm-3 control-label f_4"><span class="span-required">*</span>注册地址:</label>
								<div class="col-sm-9 f_6">
									<form:input id="address" path="address" htmlEscape="false" rows="4" class="f_5 required" />
								</div>
							</div>
						</div>		
						<div class="f_2">
							<div class="form-group col-sm-6">
								<label for="supplier_businessNo" class="col-sm-3 control-label f_4">营业执照号电子版:</label>
								<div class="col-sm-9 f_6">
									<input type="file" name="supplier_businessNo" >
								</div>
							</div>
						</div>	
					<div class="f_3">
	                      <div class="form-group col-xs-12">
							<label for="brandMarket.disadvantage" class="col-lb-1 control-label f_10">法定经营范围:</label>
							<div class="col-sm-10 col-lb-2 f_6">
								<form:textarea id="businessScope" path="businessScope" class="form-control f_11"  maxlength="300"/>
							</div>
						 </div>
					</div>	
					<h4>纳税人证明</h4>
					<div class="f_2">
							<div class="form-group col-sm-6">
								<label for="landTaxNo" class="col-sm-3 control-label f_4"><span class="span-required">*</span>税务登记证号:</label>
								<div class="col-sm-9 f_6">
									<form:input id="landTaxNo" placeholder="请输入税务登记证号" path="landTaxNo" htmlEscape="false" rows="4" class="f_5 required" />
								</div>
							</div>
					</div>	
					<div class="f_2">
								<div class="form-group col-sm-6">
			   					<label for="taxProxy" class="col-sm-3 control-label f_4">纳税属性:</label>
							   <div class="col-sm-9 f_6">
							   		<ossp:radio dictType="SUPPLIER_TAXPROXY" name="taxProxy"id="taxProxy"></ossp:radio>
							    </div>
							</div>
							<div class="form-group col-sm-6">
								<label for="taxType" class="col-sm-3 control-label f_4"><span class="span-required">*</span>税票类型:</label>
								<div class="col-sm-9 f_6">
									<ossp:select dictType="TAX_TYPE" name="taxType" id="taxType" defaultSelected="0" value="${supplierRegister.taxType }" class_="f_5 required"></ossp:select>
								</div>
							</div>
						</div>
						<div class="f_2">
							<div class="form-group col-sm-6">
								<label for="supplier_orgNo" class="col-sm-3 control-label f_4">税务登记证电子版:</label>
								<div class="col-sm-9 f_6">
									<input type="file" name="supplier_landTaxNo">
								</div>
							</div>
						</div>	
						<div class="f_12">
					     <button type="button" class="btn btn-danger btn_5 btn_right" onclick="window.open('${contextPath}/biz/brand/supplier/${supplierRegister.supplierAccountId}/edit','_self')">返&nbsp;回</button>
					     <button type="submit" id="save" class="btn btn-success btn_5 btn_right" <c:if test="${supplierRegister.supplierAccountId == null}">disabled="disabled"</c:if>>保&nbsp;存</button>
					   </div>
              		</form:form>
                   </div>
              </div>
		  </div>
	</div>	
</div>           
<script type="text/javascript">
	$('.form_date').datetimepicker({
        language:  'zh-CN',
        weekStart: 1,
        todayBtn:  1,
		autoclose: 1,
		todayHighlight: 1,
		startView: 2,
		minView: 2,
		forceParse: 0,
		format: 'yyyy-mm-dd',
		pickerPosition: "bottom-left"
    });
	</script>
</body>
</html>